using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using OrderService.Application.Dtos;
using OrderService.Domain.Models;

namespace OrderService.Application.Services
{
    /// <summary>
    /// 订单应用服务接口
    /// </summary>
    public interface IOrderAppService
    {
        /// <summary>
        /// 创建订单
        /// </summary>
        /// <param name="request">创建订单请求</param>
        /// <returns>订单ID</returns>
        Task<Guid> CreateOrderAsync(CreateOrderRequest request);

        /// <summary>
        /// 获取订单
        /// </summary>
        /// <param name="id">订单ID</param>
        /// <returns>订单响应模型</returns>
        Task<OrderResponse> GetOrderAsync(Guid id);

        /// <summary>
        /// 获取订单（按订单编号）
        /// </summary>
        /// <param name="orderNumber">订单编号</param>
        /// <returns>订单响应模型</returns>
        Task<OrderResponse> GetOrderByNumberAsync(string orderNumber);

        /// <summary>
        /// 获取客户的所有订单
        /// </summary>
        /// <param name="customerId">客户ID</param>
        /// <returns>订单响应模型列表</returns>
        Task<List<OrderResponse>> GetOrdersByCustomerAsync(Guid customerId);

        /// <summary>
        /// 更新订单状态
        /// </summary>
        /// <param name="id">订单ID</param>
        /// <param name="status">订单状态</param>
        /// <param name="remark">备注</param>
        Task UpdateOrderStatusAsync(Guid id, string status, string remark = null);

        /// <summary>
        /// 取消订单
        /// </summary>
        /// <param name="id">订单ID</param>
        Task CancelOrderAsync(Guid id);
    }
}